package backend;

import backend.value.Label;

import java.util.ArrayList;
import java.util.List;

public class Data {
    private Label label;

    private String type;
    private List<Object> values = new ArrayList<>();

    public Data(String label, String type, List<Object> values) {
        this.label = new Label(label);
        this.type = type;
        this.values.addAll(values);
    }

    public String getType() {
        return type;
    }

    public List<Object> getValues() {
        return values;
    }

    public Label getLabel() {
        return label;
    }

    public void setLabel(Label label) {
        this.label = label;
    }

    public void setType(String type) {
        this.type = type;
    }

    public void setValues(List<Object> values) {
        this.values = values;
    }

    @Override
    public String toString() {
        return label + ": ." + type + " " + String.join(", ", values.stream().map(Object::toString).toList());
    }
}
